package com.aspose.cells.b.a;

import com.aspose.cells.Color;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Comparator;

public final class za {
   public static void a(double[] var0) {
      Arrays.sort(var0);
   }

   public static void a(int[] var0, int var1, int var2) {
      Arrays.sort(var0, var1, var1 + var2);
   }

   public static void a(double[] var0, int var1, int var2) {
      Arrays.sort(var0, var1, var1 + var2);
   }

   public static void a(Object[] var0, int var1, int var2, Comparator var3) {
      Arrays.sort(var0, var1, var1 + var2, var3);
   }

   public static void a(Object[] var0, Comparator var1) {
      Arrays.sort(var0, var1);
   }

   public static void a(Object[] var0) {
      Arrays.sort(var0);
   }

   public static int a(int[] var0, int var1) {
      return Arrays.binarySearch(var0, var1);
   }

   public static int a(double[] var0, int var1, int var2, double var3) {
      if (var1 == 0 && var2 == var0.length) {
         return Arrays.binarySearch(var0, var3);
      } else {
         for(var2 += var1; var1 < var2; ++var1) {
            if (var0[var1] == var3) {
               return var1;
            }

            if (var0[var1] > var3) {
               return -var1 - 1;
            }
         }

         return -var2 - 1;
      }
   }

   public static int a(int[] var0, int var1, int var2, int var3) {
      if (var1 == 0 && var2 == var0.length) {
         return Arrays.binarySearch(var0, var3);
      } else {
         for(var2 += var1; var1 < var2; ++var1) {
            if (var0[var1] == var3) {
               return var1;
            }

            if (var0[var1] > var3) {
               return -var1 - 1;
            }
         }

         return -var2 - 1;
      }
   }

   public static int a(long[] var0, int var1, int var2, long var3) {
      if (var1 == 0 && var2 == var0.length) {
         return Arrays.binarySearch(var0, var3);
      } else {
         for(var2 += var1; var1 < var2; ++var1) {
            if (var0[var1] == var3) {
               return var1;
            }

            if (var0[var1] > var3) {
               return -var1 - 1;
            }
         }

         return -var2 - 1;
      }
   }

   public static int[] a(int[] var0) {
      if (var0 == null) {
         return null;
      } else {
         int[] var1 = new int[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static double[] b(double[] var0) {
      if (var0 == null) {
         return null;
      } else {
         double[] var1 = new double[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static float[] a(float[] var0) {
      if (var0 == null) {
         return null;
      } else {
         float[] var1 = new float[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static byte[] a(byte[] var0) {
      if (var0 == null) {
         return null;
      } else {
         byte[] var1 = new byte[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static com.aspose.cells.b.a.b.zo[] a(com.aspose.cells.b.a.b.zo[] var0) {
      if (var0 == null) {
         return null;
      } else {
         com.aspose.cells.b.a.b.zo[] var1 = new com.aspose.cells.b.a.b.zo[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static Color[] a(Color[] var0) {
      if (var0 == null) {
         return null;
      } else {
         Color[] var1 = new Color[var0.length];

         for(int var2 = 0; var2 < var0.length; ++var2) {
            var1[var2] = var0[var2];
         }

         return var1;
      }
   }

   public static Object a(Object var0, int var1) {
      return Array.get(var0, var1);
   }

   public static Object a(Object[] var0, int var1) {
      return var0[var1];
   }

   public static void a(Object[] var0, Object var1, int var2) {
      var0[var2] = var1;
   }

   public static int a(Object[] var0, Object var1, int var2, int var3) {
      if (var0 == null) {
         throw new NullPointerException("array");
      } else if (var2 >= 0 && var2 <= var0.length) {
         int var4 = var2 + var3;
         if (var3 >= 0 && var4 <= var0.length) {
            int var5;
            if (var1 == null) {
               for(var5 = var2; var5 < var4; ++var5) {
                  if (var0[var5] == null) {
                     return var5;
                  }
               }
            } else {
               for(var5 = var2; var5 < var4; ++var5) {
                  if (var1.equals(var0[var5])) {
                     return var5;
                  }
               }
            }

            return -1;
         } else {
            throw new IndexOutOfBoundsException("count");
         }
      } else {
         throw new IndexOutOfBoundsException("startIndex");
      }
   }

   public static void b(Object[] var0) {
      if (var0 == null) {
         throw new NullPointerException("array");
      } else {
         byte var1 = 0;
         int var2 = var0.length;
         if (var1 >= 0 && var2 >= 0) {
            if (var0.length - var1 < var2) {
               throw new IndexOutOfBoundsException("length");
            } else {
               int var3 = var1;

               for(int var4 = var1 + var2 - 1; var3 < var4; --var4) {
                  Object var5 = var0[var3];
                  var0[var3] = var0[var4];
                  var0[var4] = var5;
                  ++var3;
               }

            }
         } else {
            throw new IndexOutOfBoundsException(var1 < 0 ? "index" : "length");
         }
      }
   }

   public static void a(char[] var0) {
      if (var0 == null) {
         throw new NullPointerException("array");
      } else {
         byte var1 = 0;
         int var2 = var0.length;
         if (var1 >= 0 && var2 >= 0) {
            if (var0.length - var1 < var2) {
               throw new IndexOutOfBoundsException("length");
            } else {
               int var3 = var1;

               for(int var4 = var1 + var2 - 1; var3 < var4; --var4) {
                  char var5 = var0[var3];
                  var0[var3] = var0[var4];
                  var0[var4] = var5;
                  ++var3;
               }

            }
         } else {
            throw new IndexOutOfBoundsException(var1 < 0 ? "index" : "length");
         }
      }
   }

   public static void a(byte[] var0, int var1, int var2) {
      Arrays.fill(var0, var1, var1 + var2, (byte)0);
   }

   public static void a(byte[] var0, int var1, int var2, byte var3) {
      Arrays.fill(var0, var1, var1 + var2, var3);
   }
}
